<!--%import("js/resource.js")-->
<h1 class="h1">{$lang->search_dependency}</h1>
<form action="./" style="text-align:right; margin-bottom:10px;" onsubmit="location.href=location.href.setQuery('search_keyword',jQuery('#search_keyword').get(0).value); return false;">
	<input type="text"  name="search_keyword" id="search_keyword" value="{htmlspecialchars($search_keyword)}"/>
	<span class="btn"><input type="submit" value="{$lang->cmd_search}" /></span>
</form>
<div class="table">
	<table width="100%" border="1" cellspacing="0">
		<tr>
			<th>
				<form action="./" method="get">
					<select name="category_srl" id="category_srl">
						<option value="">{$lang->package_category}</option>
		{@ $_curDepth = 0; }
		<!--@foreach($categories as $key => $val)-->
						<!--@if($val->depth<$_curDepth)-->
						</optgroup>
						<!--@end-->
						<!--@if($val->depth<1)-->
						<!--@if($val->child_count>0)-->
						<optgroup label="{$val->title}">
						<!--@else-->
						<option value="{$val->category_srl}" <!--@if($category_srl == $val->category_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
						<!--@end-->
						<!--@end-->
						<!--@if($val->depth>0)-->
						<option value="{$val->category_srl}" <!--@if($category_srl == $val->category_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
						<!--@end-->
			{@ $_curDepth = $val->depth}
		<!--@end-->
						<!--@for($i=0;$i<$_curDepth;$i++)--></optgroup><!--@end-->
					</select><a href="#" onclick="location.href=location.href.setQuery('category_srl',jQuery('#category_srl option:selected').val());return false;" class="button small"><span>GO</span></a>
				</form>
			</th>
			<th>{$lang->package_path}</th>
			<th>{$lang->package_version}</th>
			<th>{$lang->cmd_select}</th>
		</tr>
		<!--@foreach($item_list as $key => $val)-->
		<tr>
			<td>[{$categories[$val->category_srl]->title}] {$val->title}</td>
			<td>{$val->path}</td>
			<td>{$val->item_version}</td>
			<td><button type="button" onclick="doInsertDependency({$val->item_srl},'[{$categories[$val->category_srl]->title}] {$val->title} (ver. {$val->item_version})'); return false;">{$lang->cmd_select}</button></td>
		</tr>
		<!--@end-->
	</table>
	
	<!-- 페이지 네비게이션 -->
</div>
<div class="pagination">
	<a href="{getUrl('page','')}" class="direction">&lsaquo; {$lang->first_page}</a> 
	<!--@while($page_no = $page_navigation->getNextPage())-->
		<!--@if($page == $page_no)-->
			<strong>{$page_no}</strong> 
		<!--@else-->
			<a href="{getUrl('page',$page_no)}">{$page_no}</a> 
		<!--@end-->
	<!--@end-->
	<a href="{getUrl('page',$page_navigation->last_page)}" class="direction">{$lang->last_page} &rsaquo;</a>
</div>
